<template>
<div>
    <Form :model="formItem" :label-width="80">
        <div>
            <span>和平区</span>
            <Input v-model="formItem.heping" placeholder=""></Input>
            <span v-if="formItem.heping" type="number">显示状态</span>
            <Input v-if="formItem.heping <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.heping <= 5 && formItem.heping > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.heping >= 10 && formItem.heping > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.heping" type="number">风险级别</span>
            <Input v-if="formItem.heping <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.heping <= 5 && formItem.heping > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.heping >= 10 && formItem.heping > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>沈河区</span>
            <Input v-model="formItem.shenhe" placeholder=""></Input>
            <span v-if="formItem.shenhe" type="number">显示状态</span>
            <Input v-if="formItem.shenhe <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.shenhe <= 5 && formItem.shenhe > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.shenhe >= 10 && formItem.shenhe > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.shenhe" type="number">风险级别</span>
            <Input v-if="formItem.shenhe <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.shenhe <= 5 && formItem.shenhe > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.shenhe >= 10 && formItem.shenhe > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>大东区</span>
            <Input v-model="formItem.dadong" placeholder=""></Input>
            <span v-if="formItem.dadong" type="number">显示状态</span>
            <Input v-if="formItem.dadong <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.dadong <= 5 && formItem.dadong > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.dadong >= 10 && formItem.dadong > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.dadong" type="number">风险级别</span>
            <Input v-if="formItem.dadong <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.dadong <= 5 && formItem.dadong > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.dadong >= 10 && formItem.dadong > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>皇姑区</span>
            <Input v-model="formItem.huanggu" placeholder=""></Input>
            <span v-if="formItem.huanggu" type="number">显示状态</span>
            <Input v-if="formItem.huanggu <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.huanggu <= 5 && formItem.huanggu > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.huanggu >= 10 && formItem.huanggu > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.huanggu" type="number">风险级别</span>
            <Input v-if="formItem.huanggu <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.huanggu <= 5 && formItem.huanggu > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.huanggu >= 10 && formItem.huanggu > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>铁西区</span>
            <Input v-model="formItem.tiexi" placeholder=""></Input>
            <span v-if="formItem.tiexi" type="number">显示状态</span>
            <Input v-if="formItem.tiexi <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.tiexi <= 5 && formItem.tiexi > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.tiexi >= 10 && formItem.tiexi > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.tiexi" type="number">风险级别</span>
            <Input v-if="formItem.tiexi <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.tiexi <= 5 && formItem.tiexi > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.tiexi >= 10 && formItem.tiexi > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>于洪区</span>
            <Input v-model="formItem.yuhong" placeholder=""></Input>
            <span v-if="formItem.yuhong" type="number">显示状态</span>
            <Input v-if="formItem.yuhong <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.yuhong <= 5 && formItem.yuhong > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.yuhong >= 10 && formItem.yuhong > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.yuhong" type="number">风险级别</span>
            <Input v-if="formItem.yuhong <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.yuhong <= 5 && formItem.yuhong > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.yuhong >= 10 && formItem.yuhong > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>苏家屯区</span>
            <Input v-model="formItem.sujiatun" placeholder=""></Input>
            <span v-if="formItem.sujiatun" type="number">显示状态</span>
            <Input v-if="formItem.sujiatun <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.sujiatun <= 5 && formItem.sujiatun > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.sujiatun >= 10 && formItem.sujiatun > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.sujiatun" type="number">风险级别</span>
            <Input v-if="formItem.sujiatun <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.sujiatun <= 5 && formItem.sujiatun > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.sujiatun >= 10 && formItem.sujiatun > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>浑南区</span>
            <Input v-model="formItem.hunnan" placeholder=""></Input>
            <span v-if="formItem.hunnan" type="number">显示状态</span>
            <Input v-if="formItem.hunnan <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.hunnan <= 5 && formItem.hunnan > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.hunnan >= 10 && formItem.hunnan > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.hunnan" type="number">风险级别</span>
            <Input v-if="formItem.hunnan <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.hunnan <= 5 && formItem.hunnan > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.hunnan >= 10 && formItem.hunnan > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>沈北新区</span>
            <Input v-model="formItem.shenbei" placeholder=""></Input>
            <span v-if="formItem.shenbei" type="number">显示状态</span>
            <Input v-if="formItem.shenbei <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.shenbei <= 5 && formItem.shenbei > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.shenbei >= 10 && formItem.shenbei > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.shenbei" type="number">风险级别</span>
            <Input v-if="formItem.shenbei <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.shenbei <= 5 && formItem.shenbei > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.shenbei >= 10 && formItem.shenbei > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>新民市</span>
            <Input v-model="formItem.xinmin" placeholder=""></Input>
            <span v-if="formItem.xinmin" type="number">显示状态</span>
            <Input v-if="formItem.xinmin <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.xinmin <= 5 && formItem.xinmin > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.xinmin >= 10 && formItem.xinmin > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.xinmin" type="number">风险级别</span>
            <Input v-if="formItem.xinmin <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.xinmin <= 5 && formItem.xinmin > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.xinmin >= 10 && formItem.xinmin > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>辽中区</span>
            <Input v-model="formItem.liaozhong" placeholder=""></Input>
            <span v-if="formItem.liaozhong" type="number">显示状态</span>
            <Input v-if="formItem.liaozhong <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.liaozhong <= 5 && formItem.liaozhong > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.liaozhong >= 10 && formItem.liaozhong > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.liaozhong" type="number">风险级别</span>
            <Input v-if="formItem.liaozhong <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.liaozhong <= 5 && formItem.liaozhong > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.liaozhong >= 10 && formItem.liaozhong > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>法库县</span>
            <Input v-model="formItem.faku" placeholder=""></Input>
            <span v-if="formItem.faku" type="number">显示状态</span>
            <Input v-if="formItem.faku <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.faku <= 5 && formItem.faku > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.faku >= 10 && formItem.faku > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.faku" type="number">风险级别</span>
            <Input v-if="formItem.faku <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.faku <= 5 && formItem.faku > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.faku >= 10 && formItem.faku > 5" placeholder="高风险区" disabled></Input>
        </div>
        <div>
            <span>康平县</span>
            <Input v-model="formItem.kangping" placeholder=""></Input>
            <span v-if="formItem.kangping" type="number">显示状态</span>
            <Input v-if="formItem.kangping <= 2" placeholder="蓝色" disabled></Input>
            <Input v-if="formItem.kangping <= 5 && formItem.kangping > 2" placeholder="黄色" disabled></Input>
            <Input v-if="formItem.kangping >= 10 && formItem.kangping > 5" placeholder="红色" disabled></Input>
            <span v-if="formItem.kangping" type="number">风险级别</span>
            <Input v-if="formItem.kangping <= 2" placeholder="低风险区" disabled></Input>
            <Input v-if="formItem.kangping <= 5 && formItem.kangping > 2" placeholder="中风险区" disabled></Input>
            <Input v-if="formItem.kangping >= 10 && formItem.kangping > 5" placeholder="高风险区" disabled></Input>
        </div>
        <FormItem>
            <Button type="primary" @click="handleSubmit()" style="margin-top: 20px;">保存</Button>
        </FormItem>
    </Form>
</div>
</template>

<script>
import { selectYq, insertYq } from '@/api/outbreak-management/dataStatistics'
export default {
  name: 'index',
  data () {
    return {
      data1: [],
      formItem: {}
    }
  },
  methods: {
    handleSubmit () {
      insertYq(this.formItem).then(ret => {
        if (ret.data.errcode === 0) {
          this.$Message.success('保存成功')
        } else {
          this.error(ret.data)
        }
      })
    },
    getDataStatistics () {
      selectYq().then(ret => {
        let data = ret.data
        if (data.errcode === 0) {
          this.formItem = data.data
        } else {
          this.error(data)
        }
      })
    }
  },
  mounted () {
    console.log('aasdasd')
    this.getDataStatistics()
  }
}
</script>

<style scoped>

</style>
